Tidy up use of environment variables in xenbus-hotplug interaction.
authoremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Wed, 7 Dec 2005 11:57:26 +0000 (11:57 +0000)
committeremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Wed, 7 Dec 2005 11:57:26 +0000 (11:57 +0000)
commit11d655cef6306d6ce0cec07c51b8c0b6c05a480f
tree9f3b627ea9812b5886e0c4a80b1677762bcc6ab3
parente21406c453cc2e1ae46dc16c2563979a60fe6143
Tidy up use of environment variables in xenbus-hotplug interaction.

I've changed this to only write "backend" (xenbus_backend.root) into
XENBUS_BASE_PATH.  After appending XENBUS_TYPE (also exported) you can
construct the "base path" easily in the scripts.  I've completely
removed writing XENBUS_FRONTEND_ID in favour of reading it from the
store at "$XENBUS_PATH/frontend-id".

Avoid re-reading the store over and over for the frontend domain's vm-path.

The patch also fixes a memory leak in backend_bus_id where we
leak the memory referenced by frontend if the function succeeds.

This work is by Christian Limpach.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c
tools/examples/block